﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/ViewMasterPage1.Master" Inherits="System.Web.Mvc.ViewPage<ComputerShopE3.Models.TIN_TUC>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
	<title>Tin tức</title>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Thêm tin tức</h2>

    <%= Html.ValidationSummary() %>

    <% using (Html.BeginForm()) {%>

        <fieldset>
            <legend></legend>
            <p>
                <%=ViewData["error"] %>
            </p>
            <p>
                <label for="TieuDe">Tiêu đề:</label>
                <%= Html.TextBox("TieuDe") %>
                <%= Html.ValidationMessage("TieuDe", "*") %>
            </p>
            <p>
                <label for="NoiDung">Nội dung:</label>
                <%= Html.TextBox("NoiDung") %>
                <%= Html.ValidationMessage("NoiDung", "*") %>
            </p>
            <p>
                <label for="NgayDang">Ngày đăng:</label>
                <%= Html.TextBox("NgayDang") %>
                <%= Html.ValidationMessage("NgayDang", "*") %>
            </p>
            <p>
            <%if (ViewData["NGUOI_DUNG"] != null)
              {%>
                <label for="IdNguoiDung">User:</label>
                <%=Html.DropDownList("IdNguoiDung", (SelectList)ViewData["NGUOI_DUNG"])%>
            <%} %>
            </p>
            <p>
                <input type="submit" value="Tạo mới" />
            </p>
        </fieldset>

    <% } %>

    <div>
        <%=Html.ActionLink("Trở lại danh mục", "Index") %>
    </div>

</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="PersonalMenu" runat="server">
</asp:Content>

